package highscore;
 
import java.util.Map; 
import java.util.HashMap; 

public class HighScore{
	
	private Map<String, Integer> highScoreMap = new HashMap<String, Integer>(); 

	public void addScore(String name, int score){
		Integer num = highScoreMap.get(name); 
		if(num == null){
			num = 0; 
		}
		num += score; 
		highScoreMap.put(name, num);
	}
	
	public Map<String, Integer> getMap(){
		return highScoreMap; 
	}
}
